using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Data;
namespace DAO
{
    public class PhieuThuTienPhat : Interface
    {
        public DataTable Load(string nameSP , string[] paraName , object[] paraValue)
        {
            string s = Application.StartupPath;
            Provider prv = new Provider("Server=.\\SQLEXPRESS;AttachDbFilename=" + s + "\\QLTV.mdf; Trusted_Connection=Yes;Integrated security=true;User Instance=true");
            DataTable dt = prv.ExecuteStoreProcedure(nameSP , paraName , paraValue);
            if(dt==null)
            {
                Provider prv1 = new Provider("Server=.\\;AttachDbFilename=" + s + "\\QLTV.mdf; Trusted_Connection=Yes;Integrated security=true;User Instance=true");
                dt = prv1.ExecuteStoreProcedure(nameSP , paraName , paraValue);
            }
            return dt;
        }
    }
}
